import Vue from 'Vue'
import VueI18n from 'vue-i18n'
import App from './components/App.vue'

Vue.use(VueI18n)
const app = function () {
    const messages = {
        zh: {
            message: {
                hello: '好好学习，天天向上！'
            }
        },
        en: {
            message: {
                hello: 'good good study, day day up!'
            }
        }
    }

    const i18n = new VueI18n({
        locale: 'zh', // 语言标识
        messages
    })

    console.log(i18n)

    const vm = new Vue({
        el: '#app',
        i18n,
        render: h => h(App)
    })

    console.log(vm.$t)

    console.log(vm)
}

export { app }